<template>
	<view>
	  <view v-for="(item, index) in arr" :key="item.code">
		<view :class="{tap: record[index]}" @click="chooseboxChange(index)" class="option">{{item.code}}. {{item.option}}</view>
	  </view>
	</view>
</template>

<script>
	export default {
		name: 'duo',
		props: ['arr', 'record'],
		data() {
			return {
			}
		},
		methods: {
			chooseboxChange(index) {
				this.$emit('fnc', index)
			}
		}
	}
</script>

<style lang="less" scoped>
	.tap {
		background-color: rgba(0, 128, 0, .5);
	}
	.option {
		padding-left: 5vw;
		line-height: 5vh;
		margin-bottom: 1vh;
	}
</style>
